<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" aria-labelledby="createOrEditModal" class="modal fade" tabindex="-1"
    role="dialog" aria-hidden="true" [config]="{backdrop: 'static'}">
    <div class="modal-dialog modal-md">
        <div class="modal-content">
            <form #propertyValueForm="ngForm"  name="ProductCategoryForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span *ngIf="!propertyValue?.id">{{l("CreatePropertyValue")}}</span>
                        <span *ngIf="propertyValue?.id">{{l("UpdatePropertyValue")}}</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" aria-label="Close">
                        <i aria-hidden="true" class="ki ki-close"></i>
                      </button>
                </div>
                <div class="modal-body">
                    <tabset class="tab-container tabbable-line">
                        <tab heading="{{l('PropertyValueMsg')}}" customClass="kt-tabs__item">
                            <div class="row">
                                <div class="col-8">
                                    <div class="form-group">
                                        <label>{{l("name")}} *</label>
                                        <input #valueInput="ngModel" class="form-control" type="text" name="name" [(ngModel)]="propertyValue.name" required maxlength="32">
                                        <validation-messages [formCtrl]="valueInput"></validation-messages>
                                    </div>
                                    <div class="form-group">
                                        <label>{{l("description")}}</label>
                                        <textarea #descriptionInput="ngModel" class="form-control" type="text" name="description" [(ngModel)]="propertyValue.description"></textarea>
                                        <validation-messages [formCtrl]="descriptionInput"></validation-messages>
                                    </div>
                                </div>
                                <div class="col-4">
                                    <div class="form-group">
                                        <label class="control-label" for="icon">{{l('icon')}}</label>
                                        <app-fileupload   [fileUrl]="propertyValue.iconUrl" (onUpLoadEvent)="onUpload($event)"></app-fileupload>
                                    </div>
                                </div>
                            </div>
                        </tab>
                    </tabset>
                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-primary" (click)="close()">{{l("Cancel")}}</button>
                    <button type="submit" class="btn btn-primary blue" [disabled]="!propertyValueForm.form.valid" [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')">
                        <i class="fa fa-save"></i>
                        <span>{{l("Save")}}</span>
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
